package com.wx.mybatis.dao2;

import com.wx.mybatis.entity.UserInfo;
import com.wx.mybatis.entity2.UserInfo2;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectKey;

/**
 * @ClassName UserInfoDao2
 * @Author wx
 * @Description 用户信息dao2
 * @Date 2018-12-27-22:09
 */
@Mapper
public interface UserInfoDao2 {
    /**
     * @methodName: addUserInfo
     * @author: wx
     * @description: 新增商品信息
     * @param userInfo2
     * @date: 2018/12/27
     * @return: void
     */
    @Insert("insert into user_info (create_time, job_number, name) values (#{createTime}, #{jobNumber}, #{name})")
    @SelectKey(keyColumn="id", keyProperty="id", resultType=Long.class, before=false, statement="select last_insert_id()")
    void addUserInfo(UserInfo2 userInfo2);
}
